March 03, 2020
Let’s find out how to set up a Django project on your Linux machine.
Ubuntu 18.04 (tested and works on 3/3/20)
sudo apt-get updatesudo apt-get dist-upgradeif you see something like below, just hit enter
this window might pop up several times, keep hitting enter

sudo apt-get install python-pipinstall pyenv
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bashset environment variable for pyenv
vi ~/.bashrcif you use zsh, open ~/.zshrc
add below in the file
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"source ~/.bashrcagain, if you use zsh, source ~/.zshrc
install pyenv dependencies
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-devinstall Python
pyenv install 3.6.9install Python libraries
sudo apt-get install python-dev python-setuptoolsupgrade pip
pip install --upgrade pippyenv virtualenv 3.6.9 <name of your choice>pyenv virtualenvs : List all Python virtualenvs found in `$PYENV_ROOT/versions/*’
activate virtualenv
pyenv activate <name of virtualenv>when you activate a virtualenv, you will see something like below in terminal
(name of virtualenv)->....cd to where you want to put Django Project inside
cd /wherever/you/wantclone Django project
git clone <blabla.git>Generate SSH key and add key to your Gitlab/Github account:
Getting permission denied (public key) on gitlab
git branch -b <name of your choice>pip install -r requirements.txtvi ~/.bashrcadd secret key, settings.module, database password to .bashrc/.zshrc so you don’t have to type export SECRET_KEY='blabla' everytime
export SECRET_KEY='<secret-key>'
export DJANGO_SETTINGS_MODULE=<settings-module>
export DATABASE_PASSWORD=<db-password>source ~/.bashrcsource action with virtualenv activated will deactivate it
activate your virtualenv again
if it says already activated, try pyenv deactivate and then activate it
cd dir/your/manage.py/livespython manage.py runserverReference
https://stackoverflow.com/questions/40427498/getting-permission-denied-public-key-on-gitlab